import React from 'react'
import { withRouter } from 'react-router-dom'
import { connect } from 'react-redux'
import { Layout } from 'antd'
import AppHeader from './Header'
import AppSider from './Sider'
import AppContent from './Content'
import TagsView from './TagsView'

import './index.scss'

const AppLayout = (props) => {
  const { tagsView } = props

  return (
    <Layout>
      <AppSider />
      <Layout style={{ minHeight: '100vh' }}>

        <AppHeader />
        {/* <TagsView /> */}
        { tagsView ? <TagsView /> : null }
        <AppContent />
        
      </Layout>
    </Layout>
  )
}

export default connect(state => state.settings)(withRouter(AppLayout))

